/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package main;

import data.GeneralDefinitions.ClusteringPriorityParameters;
import data.GeneralDefinitions.DiskType;
import data.GeneralDefinitions.OrderingParameters;
import java.io.File;
import java.util.Calendar;

public class ToEngineFacade {    
    private Engine _engine;

    public ToEngineFacade( Engine eng) {        
        this._engine = eng;
    }

    public void computeCompression() {
       _engine.computeCompression();
    }    

    public void computeClustering(Integer numOfClusters, Calendar startDate, Calendar endDate, ClusteringPriorityParameters priorityParam) {
       _engine.computeClustering(numOfClusters,startDate,endDate,priorityParam);
    }

    public void computeConfiguration(double price, double performance, double powerConsump, Calendar startDate, Calendar endDate, OrderingParameters orderingParam) {
//        System.out.println(" start date: " + startDate.get(Calendar.DATE) + " - " + startDate.get(Calendar.MONTH) + " - " + startDate.get(Calendar.YEAR));
        _engine.computeConfiguration(price, performance, powerConsump, startDate,  endDate, orderingParam);
    }

    public void computeMirroring(DiskType typeOfDisk, Double bufferSize) {
        _engine.computeMirroring(typeOfDisk,bufferSize);       
    }

    public void setFileNameFromUser(File selectedFile) {
    	_engine.parse(selectedFile);
    }

	public void loadPreviousGraph(File selectedFile) {
		_engine.loadPreviousGraph(selectedFile);
	}

	public void loadPreviousGraph(String section) {
		_engine.showPreviousGraph(section);
	}
	
	public void save(){
		_engine.save();
	}
}
